﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace AerolionMVC.Models
{
    [MetadataType(typeof(FlightMetadata))]
    public partial class Flight
    {
    }
    public class FlightMetadata
    {
        [DisplayName("Flight Code")]
        [Required(ErrorMessage="Flight Code is mandatory")]
        [RegularExpression(@"[A-Z]{3}\d{3}$",
            ErrorMessage="Flight Code should consists of 3 upper case alphabet followed with 3 digits")]
        public object FlightId{get;set;}

        [DisplayName("Route ID")]
        [Required(ErrorMessage = "Route Code is mandatory")]
        public object RouteId { get; set; }

        [DisplayName("Departure Time")]
        [Required(ErrorMessage = "Departure Time is mandatory")]
        public object DepartureTime { get; set; }

        [DisplayName("Arrival Time")]
        [Required(ErrorMessage = "Arrival Time is mandatory")]
        public object ArrivalTime { get; set; }

        [DisplayName("Active Flag")]
        [UIHint("BooleanNewStyle")]
        public object ActiveFlag { get; set; }





    }
}